package com.zlk.algorithm.util;

/**
 * @program: algorithm
 * @ClassName RandomUtil
 * @description:
 * @author: slfang
 * @create: 2024-01-11 15:18
 * @Version 1.0
 **/
public class RandomUtil {

    public static int[] generateRandomArray(int maxSize, int maxValue) {
        int[] arr = new int[maxSize];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = (int) ((maxValue + 1) * Math.random()) - (int) (maxValue * Math.random());
        }
        return arr;
    }


}
